<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<span>用户名</span><input type="text" id="username">
<br>
<span>性别</span><input type="radio" id="man">男
<input type="radio" id="girl">女
<script>
    document.getElementById('username');

    var text =document.getElementById('username');
    text.value="小俊男";
    //单选框
    var man = document.getElementById('man');
    //设置其是否被选
    man.checked = false;
</script>

</body>
</html>